package Demo1;

public class T3 {
    public static void main(String[] args) {
//        Thread t = new Thread(){//匿名内部类
//            @Override
//            public void run() {
//                System.out.println(111);
//            }
//        };
//
//        Thread thread = new Thread(() -> {   lamba 表达式
//            System.out.println(111);
//        });
        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i = 0; i < 10; i++) {
                    System.out.println("点击哼哼唧唧");
                }

            }
        },"这是我的线程A");
        thread.start();
        for (int i = 0; i < 10; i++) {
            System.out.println("ffdfffff");
        }
    }
}
